package objects;

public class DocumentPondere implements Comparable<DocumentPondere> {
	private String nomDocument;
	private Float ponderation;

	public DocumentPondere(String nomDocument, Float ponderation){
		this.nomDocument = nomDocument;
		this.ponderation = ponderation;
	}
	
	public String getNomDocument() {
		return nomDocument;
	}
	
	public Float getPonderation() {
		return ponderation;
	}

	/**
	 * Permet de comparer 2 DocumentPondere
	 * La comparaison se fait par ponderation
	 */
	public int compareTo(DocumentPondere doc) {
		if(this.ponderation < doc.getPonderation())
			return 10;
		else if (this.ponderation == doc.getPonderation())
			return 0;
		else
			return -10;
	}
	


	
}
